package com.lance.answer.gui.answer.gk.answer.lms.dto;

import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.List;

/**
 * 一网一某门课程的完成情况
 */
@NoArgsConstructor
@Data
public class LmsCompleteness {


    @JsonProperty("completed_result")
    private CompletedResultDTO completedResult;
    @JsonProperty("last_activity")
    private LastActivityDTO lastActivity;
    @JsonProperty("study_completeness")
    private Integer studyCompleteness;

    @NoArgsConstructor
    @Data
    public static class CompletedResultDTO {
        @JsonProperty("completed")
        private CompletedDTO completed;
        @JsonProperty("total_activities")
        private Integer totalActivities;
        @JsonProperty("total_completed")
        private Integer totalCompleted;

        @NoArgsConstructor
        @Data
        public static class CompletedDTO {
            @JsonProperty("exam_activity")
            // 完成的测验
            private List<Long> examActivity;
            @JsonProperty("learning_activity")
            // 完成的章节学习活动
            private List<Long> learningActivity;
        }
    }

    @NoArgsConstructor
    @Data
    public static class LastActivityDTO {
        @JsonProperty("activity_type")
        private String activityType;
        @JsonProperty("assign_group_ids")
        private List<?> assignGroupIds;
        @JsonProperty("assign_student_ids")
        private List<?> assignStudentIds;
        @JsonProperty("assign_targets")
        private AssignTargetsDTO assignTargets;
        @JsonProperty("completion_criterion_key")
        private String completionCriterionKey;
        @JsonProperty("completion_criterion_value")
        private Object completionCriterionValue;
        @JsonProperty("data")
        private DataDTO data;
        @JsonProperty("end_time")
        private Object endTime;
        @JsonProperty("group_set_id")
        private Object groupSetId;
        @JsonProperty("id")
      //  private Integer id;
        private Long id;
        @JsonProperty("is_assigned_to_all")
        private Boolean isAssignedToAll;
        @JsonProperty("module_id")
    //    private Integer moduleId;
        private Long moduleId;
        @JsonProperty("submit_by_group")
        private Boolean submitByGroup;
        @JsonProperty("syllabus_id")
        private Object syllabusId;
        @JsonProperty("teaching_unit_id")
     //   private Integer teachingUnitId;
        private Long teachingUnitId;
        @JsonProperty("title")
        private String title;
        @JsonProperty("type")
        private String type;

        @NoArgsConstructor
        @Data
        public static class AssignTargetsDTO {
        }

        @NoArgsConstructor
        @Data
        public static class DataDTO {
            @JsonProperty("selected_section")
            private Object selectedSection;
        }
    }
}
